Repository navigation
docs: explain OpenAPI integer bounds generation - #1721
jeeeeetshahhhhh wants to merge 5 commits into
Conversation
|
hi @jeeeeetshahhhhh i am not sure if a new config or makefile command is required given that this is already a defined step in pre-commit steps anyone interested can just use this command manually as well pokeapi/.pre-commit-config.yaml Line 55 in 8a92bfa in fact this dosent require docker running or a local postgres the config only serves the purpose of telling django spectacular whats the backend db like and based on that it decides the int bounds from the db int type no actual query to db is made what i could see however is we can make a note of this behavior somewhere in contributing |
|
Thanks for clarifying. I removed the extra settings module and Make target, and moved the change to CONTRIBUTING.md. It now documents the existing manual |
|
Addressed in 78d62e6. I moved the database-backend/schema-generation explanation into the existing CONTRIBUTING note, removed the duplicate manual command instructions, and added the requested guidance to run pre-commit after model/schema changes and locally before opening a PR. |
Updated instructions for running pre-commit hooks and clarified linting and typechecking enforcement.
|
made a small revision to the comment lmk if it looks clear @jeeeeetshahhhhh i think we can skip the details regarding sqlite vs postgres int bounds seems too niche for a contributing.md when we already have the command to be used defined in pre-commit people interested in the nuances can just checkout the command manually cc: @Naramsim any thoughts regarding this? seems like a fair enough gotcha ppl might have encountered given mix between sqlite and postgres backends we use |
|
Thanks for the revision. I removed the SQLite/PostgreSQL integer-bounds explanation and kept the CONTRIBUTING note focused on running pre-commit locally, regenerating |
Summary
generate-openapipre-commit commandAddresses #1623 by explaining why SQLite and PostgreSQL can produce different integer bounds and how to regenerate the schema consistently.
Validation
git diff --check